<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>用户表</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../res/css/layui.css"  media="all">
<link rel="stylesheet" href="../../res/css/lj/snuser.css"  media="all">
<script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
</head>
<body>

 <div class="demoTable" style="margin-left:20px;margin-top: 10px;">
  用户名:
 <div class="layui-inline">
			<input class="layui-input" style="height: 32px;" id="userName"  placeholder="请输入用户名" 
				autocomplete="off">
		</div>
 操作人:
 <div class="layui-inline">
			<input class="layui-input" style="height: 32px;" id="oper"  placeholder="请输入操作人" 
				autocomplete="off">
		</div>
		
状态:
		<from class="layui-form">
		<div class="layui-inline">
			<select lay-filter="aihao" id="state"
				style="width: 100px; border: 1px solid red;">
				<option value="">====请选择====</option>
				<option value="1">已审核</option>
				<option value="2">未审核</option>
			</select>
		</div>
		</from>
  <button class="layui-btn layui-btn-sm" data-type="reload" id="selectButton">搜索</button>
  <button class="layui-btn layui-btn-warm layui-btn-sm" id="insert" >增加</button>

</div>
 
<table class="layui-table" lay-data="{ url:'../../UserAction/selectAll.action', page:true, id:'idTest'}" id="table" lay-filter="demo">
  <thead>
    <tr>
      <th lay-data="{type:'checkbox', fixed: 'left'}"></th>
      <!--  <th lay-data="{field:'userId', align:'center',templet:'#imgTpls',width:'100'}">用户ID</th>-->
      <th lay-data="{field:'braName', align:'center',templet:'#imgTpls',width:'180'}">分公司名称</th>
      <th lay-data="{field:'userName', align:'center',width:'120'}">用户姓名</th>
      <th lay-data="{field:'userPwd', align:'center',width:'120'}">用户密码</th>
      <th lay-data="{field:'userSex', align:'center',templet:'#imgTpl',width:'100'}">用户性别</th>
      <th lay-data="{field:'userPhone', align:'center',width:'180'}">用户电话</th>
      <th lay-data="{field:'userEmail', align:'center',width:'180'}">用户邮箱</th>
      <th lay-data="{field:'userImage', align:'center',templet:'#userImages',sort: true, width:'100'}">用户头像</th>
      <th lay-data="{field:'oper', align:'center',width:'100'}">操作人</th>
      <th lay-data="{field:'userState', align:'center',templet:'#imgTpla',width:'100'}">用户状态</th>
      <th lay-data="{field:'optime', align:'center',width:'180'}">操作时间</th>
      <th lay-data="{fixed: 'right', fixed: 'right',align:'center', toolbar: '#barDemo',width:'150',}">操作</th>
    </tr>
  </thead>
</table>



<script type="text/javascript" id="imgTpl">
	 {{# if(d.userSex == 1) { }}
     <div>男</div>
 	 {{# } else if(d.userSex == 2){ }}
    <div>女</div>
	{{# }}}
</script>

<script type="text/javascript" id="imgTpla">
	 {{# if(d.userState == 1) { }}
     <div>已审核</div>
 	 {{# } else if(d.userState == 2){ }}
    <div>未审核</div>
	{{# }}}
</script>


<script type="textml" id="userImages">
    <img style="width:40px;height:40px;" src="../../{{ d.userImage }}">
</script>



<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="edit" >编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
  <!--  {{# if(d.userState == 1) { }}
   	<button class="layui-btn layui-btn-xs layui-btn-disabled">已审核</button>
 {{# } else if(d.userState == 2){ }}
	<button class="layui-btn layui-btn-xs layui-btn-disabled">未审核</button>
 {{# }}} -->
           
<!-- 增加或修改的弹框 -->
<div id="addOrUpdate" style="display: none;padding-bottom: 20px;">
	<form id="myform" onsubmit=" return filiale()" class="layui-form"  method="post" action="../../UserAction/addorUpdate.action" style="margin-top: 10px;" enctype="multipart/form-data">
		<input type="hidden" name="userId" id="userId"/>
	    
	   <div class="aru"  class="layui-form" lay-filter="test1">
	    <label class="layui-form-label">公司名称:</label>  
	    <div class="layui-input-block" >
	        <select name="braId" lay-verify="required"  id="bar" >
			</select>
			<input type="hidden"  class="fromYz" id="CompanyYz">
	    </div>
	  </div>
	  
	   <div class="aru">
	    <label class="layui-form-label">用户姓名:</label>
	    <div class="layui-input-block">
	     <input name="userName" id="userNames" class="layui-input" type="text" maxlength="5"  placeholder="请输入用户名"  onblur="snUserName()">
	     <input type="hidden"  class="fromYz" id="NameYz">
	    </div>
	  </div>
	  
	   <div class="aru">
	    <label class="layui-form-label">用户密码:</label>
	    <div class="layui-input-block">
	     <input name="userPwd" id="userPwd" class="layui-input"  type="password" maxlength="11"  placeholder="请输入用户密码"  onblur="snPwd()">
	     <input type="hidden"  class="fromYz" id="PwdYz">
	    </div>
	  </div>
	  
	  
	<div class="aru">
	    <label class="layui-form-label">用户性别:</label>
	    <div class="layui-input-block">
	      <input type="radio" name="userSex" id="userSex"  value="1" title="男" checked="">
	      <input type="radio" name="userSex" id="userSex"  value="2" title="女">
	    </div>
 	</div>
 	
 	
	  
	  <div class="aru">
	    <label class="layui-form-label">用户电话:</label>
	    <div class="layui-input-block">
	     <input name="userPhone" id="userPhone" class="layui-input" type="text" placeholder="请输入用户电话" maxlength="11" onblur="snPhone()"  onkeyup="this.value=this.value.replace(/\D/g,'')">
	     <input type="hidden"  class="fromYz" id="PhoneYz">
	    </div>
	  </div>
	  
	 <div class="aru">
	    <label class="layui-form-label">用户邮箱:</label>
	    <div class="layui-input-block">
	     <input name="userEmail" id="userEmail" class="layui-input" type="email" placeholder="请输入用户邮箱" onblur="snEmali(this.value)" >
	   	 <input type="hidden"  class="fromYz" id="EmailYz">
	    </div>
	  </div>
	  
	  
	 <div class="aru">
	    <label class="layui-form-label">是否有效:</label>
	    <div class="layui-input-block">
	      <select name="isva" lay-filter="aihao" id="isva" style="width:100px;border: 1px solid red;">
	        <option value="1">是</option>
	        <option value="2">否</option>
	      </select>
	    </div>
	  </div>
	
	<div class="aru">
		  <label class="layui-form-label">用户头像:</label>
		  <input type="button" class="layui-btn" id="userImage" lay-verify="comImage" name="file"  value="上传图片" >
		  <span id="FileName"></span>
		  <img class="layui-upload-img"  id="img" src="" name="img" onblur="snImage(this)" style="width:60px;height:60px;margin-left:8px; ">
		  <input type="hidden"  class="fromYz" id="ImageYz">
	</div>
	
	
  
   
  <div class="layui-form-item">
    <label class="layui-form-label">角色:</label>
    <div class="layui-input-block" id="ron" name="ron" style="">
    </div>
    <input type="hidden" name="ronId"  id="roId" style="width:1000px;">
  </div>
	
	  
	  <div class="aru">
	    <div class="layui-input-block">
	      <input type="button" class="layui-btn"  onclick="buttonSubmit();" value="确认提交"/>
	      <a href="javascript:exit();" class="layui-btn layui-btn-danger">关闭</a>
	    </div>
	   </div>
	</form>
</div>    
          
<script src="../../res/layui.all.js" charset="utf-8"></script>
<script type="text/javascript" src="../../res/js/lj/snuser.js"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
</body>
</html>